1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method.
2. Description of the Related Art
Conventionally, increase of image quality of letters in printed materials has been addressed by performing edge processing on image data including letters only, the edge processing by which the edge of each letter is extracted, and pixel values of pixels of the edge are adjusted. As a type of the edge processing, thinning processing is known. By the thinning processing, the pixel values of the edge of a letter are reduced so as to make the letter thin. Accordingly, a shape letter can be reproduced.
On the other hand, on image data including pictures only, gradation processing, such as screen processing or error diffusion processing, is performed so as to express halftones.
However, in general, many printed materials, such as catalogues or magazines, have both letters and pictures. Even when a printed material has only letters, various densities and colors are used for the letters, and accordingly the screen processing is necessary to reproduce the densities and colors.
Because the screen processing gives a shape of a dot or line to a target, if the screen processing is performed on image data including a letter, jaggies may be generated in the contour of the letter, and accordingly a smooth line cannot be reproduced. Consequently, the image quality of the letter may decrease. In order to prevent jaggies, types of the screen processing are switched. That is, the screen processing with a high screen ruling (lpi) is performed on the edge of a letter only. Alternatively, the edge of a letter is excluded from a target for the screen processing. For example, in Japanese Patent Application Laid-Open Publication No. 2005-341249, there is disclosed a method of performing the thinning processing to reduce the pixel values of the edge of a letter, performing continuous tone processing on the edge thereafter, and performing the screen processing on the other region.
Another type of the edge processing is smoothing processing. By the smoothing processing, the edge of a slant part of a letter is identified by pattern matching or the like, and the pixel values of the edge are changed gradually taking a step of the slant part as a center. Accordingly, a smooth line can be reproduced.
Conventionally, the smoothing processing has been performed after the screen processing. This is because it is easier to identify the edge of a slant part by the pattern matching if binary image data obtained by the screen processing is a target for the smoothing processing. In the pattern matching, it is necessary to know the pixel values of an attention pixel and its surrounding pixels together. If the target is binary image data, it is only necessary to determine whether gradations are the maximum value or the minimum value, so that the pixel values of pixels can be easily known. Furthermore, by limiting the target to solid letters (the letters having a gradation of the maximum value), even after the screen processing is performed so as to produce binary image data, the pattern matching can be performed with no influence of the screen processing, which has been convenient.
However, once gamma correction processing to keep print densities uniform starts to be performed in a printer or the like, inconvenience arises. Gamma correction curves used for the gamma correction processing are often updated to deal with printing characteristics, which change. However, depending on the gamma correction curves, there is a case where pixel values as the maximum value are inputted, but pixel values lower than the maximum value are outputted. Because the maximum value is not outputted, dots are generated in a solid letter region by the screen processing, and accordingly the solid letter is expressed as a letter having a halftone. Such a halftone region is not identified as a solid letter by the pattern matching of the smoothing processing, which is performed after the screen processing. Consequently, the smoothing processing is not performed.
Furthermore, in the smoothing processing, taking a letter having a gradation of a halftone close to a solid letter, namely, close to a gradation of the maximum value, as a target increases the image quality of the letter. However, similarly to the case described above, dots are generated in the letter having a gradation of such a halftone by the screen processing. Consequently, the smoothing processing is not performed.
For the reasons described above, there is no merit any longer in performing the smoothing processing after the screen processing. Rather, there is a case where image processing, the target for which is an edge, such as the smoothing processing, is better to be performed before the screen processing or the gamma correction processing so as to easily determine whether a letter is a solid letter or not.
In order to perform the edge processing, such as the smoothing processing, before the screen processing, a careful consideration is necessary for a region of a target (target region) for the screen processing. If the screen processing is performed on the whole region, the screen processing is performed on the whole edge too, the pixel values of which are finely adjusted by the edge processing. Consequently, effects of the edge processing cannot be obtained, or worse, the image quality may decrease. In order to avoid decrease of the image quality, and obtain the effects of the edge processing, as disclosed in Japanese Patent Application Laid-Open Publication No. 2005-341249 mentioned above, it is necessary to exclude the edge of a letter from a target for the screen processing, and perform the continuous tone processing thereon.
However, it does not mean that the image quality increases if the continuous tone processing is performed on the edge only, because the pixels having the pixel values adjusted by the edge processing are not limited to pixels (edge pixels) of the edge. If the continuous tone processing is performed on the edge only although there are other pixels (no-edge pixels) having the pixel values changed by the edge processing, the screen processing is performed on the no-edge pixels, and gradations of the no-edge pixels are expressed by dots. Consequently, an effect of the edge processing, namely, expressing detail, is weakened. Furthermore, in a case where an edge forms a step, the edge (edge pixels), on which the continuous tone processing has been performed, and the no-edge pixels, on which the screen processing has been performed, are located on a same line. Unless the no-edge pixels on which the screen processing has been performed are dotted, the contour enhanced by the continuous tone processing looks cut.
Furthermore, as is the case with the smoothing processing and the thinning processing, a plurality of types of the edge processing may be performed in parallel. In order to adjust their respective processing results, there is a case where not only pixels (edge pixels) of the edge but also pixels (adjacent pixels) adjacent to the edge pixels are processed. The adjacent pixels are, similarly to the case described above, not a target for the continuous tone processing although the pixel values thereof have been adjusted by the edge processing. Consequently, the screen processing is performed on the adjacent pixels, and hence the effects of the edge processing cannot be obtained.